package com.nbsaas.boot.script.rest.convert;

import com.nbsaas.boot.script.data.entity.ScriptTemplate;
import com.nbsaas.boot.script.api.domain.request.ScriptTemplateRequest;

import org.springframework.beans.BeanUtils;
import com.nbsaas.boot.rest.api.Converter;
import com.nbsaas.boot.utils.BeanDataUtils;

/**
* 请求对象转换成实体对象
*/

public class ScriptTemplateEntityConvert  implements Converter<ScriptTemplate, ScriptTemplateRequest> {

    @Override
    public ScriptTemplate convert(ScriptTemplateRequest source) {
        ScriptTemplate result = new ScriptTemplate();
        BeanDataUtils.copyProperties(source, result);
        return result;
    }
}

